﻿<%@ Page Title="" Language="vb" AutoEventWireup="false" MasterPageFile="~/MasterPage/User.Master"
    CodeBehind="Register.aspx.vb" Inherits="GoodAnotApp.Register" %>

    <%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <title id="pageTitle" runat="server"></title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <script src="Common/Amcharts 2.5/amcharts/amcharts.js" type="text/javascript"></script>
    <script src="Common/Amcharts 2.5/amcharts/raphael.js" type="text/javascript"></script>
    <script src="Scripts/bootstrap-twipsy.js" type="text/javascript"></script>
    <script src="Scripts/bootstrap-popover.js" type="text/javascript"></script>
    <script type="text/javascript">
        function pageLoad() {
            var mpe = $find("ModalPopupExtenderLogin");

            mpe.add_shown(onShown);
            mpe.add_hidden(onHidden);

            var shown = ($get("hfModalVisible").value == "shown");
            if (shown) {
                mpe.show();
            }
        }

        function onShown() {
            var hf = $get("hfModalVisible");
            hf.value = "shown";
        }

        function onHidden() {
            var hf = $get("hfModalVisible");
            hf.value = "hidden";
        }
           </script>
    <style type="text/css">
        .style2
        {
            width: 364px;
        }
        .style3
        {
            width: 129px;
        }
        .style6
        {
            text-align: left;
        }
        .style7
        {
            width: 127px;
            height: 56px;
        }
        .style8
        {
            width: 364px;
            height: 56px;
        }
        .style9
        {
            height: 56px;
        }
        .style14
        {
            width: 212px;
        }
        .style15
        {
            width: 127px;
        }
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <asp:Panel ID="Panel1" runat="server">
        <div class="style6">
            <b> <h3 style="color: black;">Register<h5 /></b></div>
        <table style="width: 110%;">
            <tr>
                <td class="style7" style = "border-top:0px">
                    <asp:Label ID="lblEmail" runat="server" Text="Email Address"></asp:Label>
                    &nbsp;<br />
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="tbxEmail"
                        ErrorMessage="Field is required" ForeColor="Red"></asp:RequiredFieldValidator>
                </td>
                <td class="style8" colspan="2" style = "border-top:0px">
                    <asp:TextBox ID="tbxEmail" runat="server" Width="223px" AutoPostBack="True" 
                        EnableTheming="True"></asp:TextBox>
                    <asp:Button ID="btnCheck" runat="server" CausesValidation="False" class="btn" Text="Check Availability"
                        Width="133px" />
                </td>
                <td class="style9" style = "border-top:0px">
                    <asp:UpdatePanel ID="updatePnlEmail" runat="server">
                        <ContentTemplate>
                            <asp:Label ID="lblWarningEmail" runat="server" Text="Label" Visible="False" ForeColor="Red"></asp:Label>
                            <asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" 
                                ControlToValidate="tbxEmail" 
                                ErrorMessage="Please enter in the following format &quot;jenny@yahoo.com&quot;" 
                                ValidationExpression="^(?(&quot;&quot;)(&quot;&quot;.+?&quot;&quot;@)|(([0-9a-zA-Z]((\.(?!\.))|[-!#\$%&amp;'\*\+/=\?\^`\{\}\|~\w])*)(?&lt;=[0-9a-zA-Z])@))(?(\[)(\[(\d{1,3}\.){3}\d{1,3}\])|(([0-9a-zA-Z][-\w]*[0-9a-zA-Z]\.)+[a-zA-Z]{2,6}))$" 
                                ForeColor="Red"></asp:RegularExpressionValidator>
                            
                            <br />
                            <asp:Label ID="lblAvailEmail" runat="server" Text="Label" Visible="False"></asp:Label>
                        </ContentTemplate>
                        <Triggers>
                            <asp:AsyncPostBackTrigger ControlID="btnCheck" EventName="Click" />
                            <asp:AsyncPostBackTrigger ControlID="tbxEmail" EventName="TextChanged" />
                        </Triggers>
                    </asp:UpdatePanel>
                </td>
            </tr>
            <tr>
                <td class="style15" style = "border-top:0px">
                    <asp:Label ID="lblDisplayName" runat="server" Text="Display Name"></asp:Label>
                    &nbsp;<br />
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator5" runat="server" ControlToValidate="tbxDisplayName"
                        ErrorMessage="Field is required" ForeColor="Red"></asp:RequiredFieldValidator>
                </td>
                <td class="style2" colspan="2" style = "border-top:0px">
                    <asp:TextBox ID="tbxDisplayName" runat="server" Width="223px" 
                        AutoPostBack="True"></asp:TextBox>
                    <asp:Button ID="btnCheck2" runat="server" CausesValidation="False" class="btn" Text="Check Availability"
                        Width="135px" />
                </td>
                <td style = "border-top:0px">
                    <asp:UpdatePanel ID="updatePnlName" runat="server">
                        <ContentTemplate>
                            <asp:Label ID="lblWarningName" runat="server" Text="Label" Visible="False" ForeColor="Red"></asp:Label>
                            <br />
                            <asp:Label ID="lblAvailName" runat="server" Text="Label" Visible="False"></asp:Label>
                        </ContentTemplate>
                        <Triggers>
                            <asp:AsyncPostBackTrigger ControlID="btnCheck2" EventName="Click" />
                            <asp:AsyncPostBackTrigger ControlID="tbxDisplayName" EventName="TextChanged" />
                        </Triggers>
                    </asp:UpdatePanel>
                </td>
            </tr>
            <tr>
                <td class="style15" style = "border-top:0px">
                    <asp:Label ID="lblPassword" runat="server" Text="Password"></asp:Label>
                    &nbsp;<br />
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator6" runat="server" ControlToValidate="tbxPassword"
                        ErrorMessage="Field is required" ForeColor="Red"></asp:RequiredFieldValidator>
                </td>
                <td class="style2" colspan="2" style = "border-top:0px">
                    <asp:TextBox ID="tbxPassword" runat="server" TextMode="Password" Width="223px"></asp:TextBox>
                    &nbsp;
                </td>
                <td style = "border-top:0px">
                    <asp:RegularExpressionValidator ID="RegularExpressionValidator2" runat="server" 
                        ControlToValidate="tbxPassword" 
                        ErrorMessage="Your password must be between 8 to 10 characters, contain at least 1 digit and 1 alphabetic character, and must not contain special characters" 
                        ForeColor="Red" 
                        ValidationExpression="(?!^[0-9]*$)(?!^[a-zA-Z]*$)^([a-zA-Z0-9]{8,10})$"></asp:RegularExpressionValidator>
                </td>
            </tr>
            <tr>
                <td class="style15" style = "border-top:0px">
                    <asp:Label ID="lblRetypePassword" runat="server" Text="Retype Password"></asp:Label>
                </td>
                <td class="style2" colspan="2" style = "border-top:0px">
                    <asp:TextBox ID="tbxRetypePassword" runat="server" TextMode="Password" Width="223px"></asp:TextBox>
                    &nbsp;
                </td>
                <td style = "border-top:0px">
                    <asp:CompareValidator ID="CompareValidator1" runat="server" ControlToCompare="tbxPassword"
                        ControlToValidate="tbxRetypePassword" ErrorMessage="Your password does not match"
                        ForeColor="Red"></asp:CompareValidator>
                    <br />
                </td>
            </tr>
            <tr>
                <td style = "border-top:0px" class="style15">
                    <asp:Label ID="lblGender" runat="server" Text="Gender"></asp:Label>
                    &nbsp;<br />
                </td>
                <td width="100px" style = "border-top:0px">
                    <div class="input" style="margin-left: 25px">
                        <ul class="inputs-list">
                            <li>
                                <asp:RadioButton ID="rbtnMale" runat="server" GroupName="Gender" Text="Male" ValidationGroup="Gender"
                                    Checked="True" />
                            </li>
                        </ul>
                    </div>
                </td>
                <td class="style14" style = "border-top:0px">
                    <div class="input" style="margin-left: 0px">
                        <ul class="inputs-list">
                            <li>
                                <asp:RadioButton ID="rbtnFemale" runat="server" GroupName="Gender" Text="Female"
                                    ValidationGroup="Gender" />
                            </li>
                        </ul>
                    </div>
                </td>
            </tr>
            <tr>
                <td style = "border-top:0px" class="style15">
                    <br />
                    <br />
                    <br />
                    <br />
                    <asp:Label ID="lblCaptcha" runat="server" Text="Please enter the code"></asp:Label>
                </td>
                <td width="100px" style = "border-top:0px">
                    
                    <asp:Image ID="Image1" runat="server" ImageUrl="captcha.aspx" />
                    <br />
                    <br />
                    <asp:TextBox ID="tbxCaptcha" runat="server"></asp:TextBox>
                </td>
                <td class="style14" style = "border-top:0px">
                    &nbsp;</td>
                <td style = "border-top:0px">
                    &nbsp;</td>
            </tr>
        </table>
        <div class="input" style="margin-left: 25px">
            <ul class="inputs-list">
                <li>
                    <asp:CheckBox ID="cbxTC" runat="server" Text="I have read, understood and accept the Terms of Use and Privacy Policy for this web site."
                        AutoPostBack="True" />
                </li>
            </ul>
        </div>
        <br />
        <br />
    </asp:Panel>
    <asp:UpdatePanel ID="updatePnlButtons" runat="server">
        <ContentTemplate>
            &nbsp;<asp:Button ID="btnRegister" runat="server" Text="Register" class="btn" Enabled="False" />
            &nbsp;&nbsp;
            <asp:Button ID="btnCancel" runat="server" Text="Cancel" class="btn" />
        </ContentTemplate>
        <Triggers>
            <asp:AsyncPostBackTrigger ControlID="cbxTC" EventName="CheckedChanged" />
        </Triggers>
    </asp:UpdatePanel>
    </br>
    </br>
</asp:Content>
